package com.lovejes.jesacl.domain.base;

import java.io.Serializable;


/**
 * 
   TODO
   date:2013-7-1
   author:hyyy
   @preserve all
 */
public abstract class BaseTJesId  implements Serializable {

	public static String REF = "TJesId";
	public static String PROP_TNAME = "Tname";
	public static String PROP_CUR = "Cur";
	public static String PROP_INIT = "Init";
	public static String PROP_ID = "Id";
	public static String PROP_INC = "Inc";


	// constructors
	public BaseTJesId () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseTJesId (java.lang.String id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseTJesId (
		java.lang.String id,
		java.lang.String tname,
		java.lang.Integer init,
		java.lang.Integer cur,
		java.lang.Integer inc) {

		this.setId(id);
		this.setTname(tname);
		this.setInit(init);
		this.setCur(cur);
		this.setInc(inc);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.String id;

	// fields
	private java.lang.String tname;
	private java.lang.Integer init;
	private java.lang.Integer cur;
	private java.lang.Integer inc;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="uuid"
     *  column="ID"
     */
	public java.lang.String getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.String id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: TNAME
	 */
	public java.lang.String getTname () {
		return tname;
	}

	/**
	 * Set the value related to the column: TNAME
	 * @param tname the TNAME value
	 */
	public void setTname (java.lang.String tname) {
		this.tname = tname;
	}



	/**
	 * Return the value associated with the column: INIT
	 */
	public java.lang.Integer getInit () {
		return init;
	}

	/**
	 * Set the value related to the column: INIT
	 * @param init the INIT value
	 */
	public void setInit (java.lang.Integer init) {
		this.init = init;
	}



	/**
	 * Return the value associated with the column: CUR
	 */
	public java.lang.Integer getCur () {
		return cur;
	}

	/**
	 * Set the value related to the column: CUR
	 * @param cur the CUR value
	 */
	public void setCur (java.lang.Integer cur) {
		this.cur = cur;
	}



	/**
	 * Return the value associated with the column: INC
	 */
	public java.lang.Integer getInc () {
		return inc;
	}

	/**
	 * Set the value related to the column: INC
	 * @param inc the INC value
	 */
	public void setInc (java.lang.Integer inc) {
		this.inc = inc;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.lovejes.jesacl.domain.TJesId)) return false;
		else {
			com.lovejes.jesacl.domain.TJesId tJesId = (com.lovejes.jesacl.domain.TJesId) obj;
			if (null == this.getId() || null == tJesId.getId()) return false;
			else return (this.getId().equals(tJesId.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}